package com.isunny.mode.tactics.strategy;

import com.isunny.mode.tactics.annotation.Eviction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;


/**
 * 最近最少淘汰策略
 *
 * @author luom
 * @date 2022/2/25
 */
@Eviction(value = "LFU", desc = "最近最少策略")
@Component
public class LfuEvictionStrategy implements EvictionStrategy {

    private static final Logger log = LoggerFactory.getLogger(LfuEvictionStrategy.class);

    /**
     * 淘汰缓存
     */
    @Override
    public String evictionCache() {
        log.info("LFU Eviction Strategy");
        return "LFU Eviction Strategy";
    }
}
